import {request} from "../request";

/**
 * 获取所有权限信息
 * @returns {返回Promise实例}
 */
export function getAllPermissions() {
  return request({
    url: '/permission/getAllPermissions',
  })
}

/**
 * 根据roleId获取所有的权限信息
 * @param roleId
 * @returns {返回Promise实例}
 */
export function getPermissionByRole(roleId) {
  return request({
    url: '/permission/getPermissionByRole',
    params: {
      roleId
    }
  })
}